package load;

/**
 * @author shkstart
 * @date 2022/4/25 - 17:28
 */
public class OverLoadExer {
    public static void main(String[] args) {
        OverLoadExer test = new OverLoadExer();

        test.mOL(8);
        test.mOL(7, 9);
        test.mOL("听雨的声音");

        test.max(99, 88);
        test.max(89.88, 97.66);
        test.max(90.00, 1222.98, 2334.678);
    }

    public void mOL(int i) {
        System.out.println("i*i" + "=" + i * i);
    }

    public void mOL(int i, int j) {
        System.out.println("i*j" + "=" + i * j);
    }

    public void mOL(String s) {
        System.out.println(s);
    }

    public void max(int i, int j) {
        int max = j > i ? j : i;
        System.out.println("俩个int值中最大值为：" + max);
    }

    public void max(double i, double j) {
        double max = j > i ? j : i;
        System.out.println("俩个double值中最大值为：" + max);
    }

    public void max(double i, double j, double k) {
        double max = j > i ? j : i;
        max = max > k ? max : k;
        System.out.println("三个double值中最大值为：" + max);
    }


}
